Skip to content

Update typeberry/lib#482

Merged
tomusdrw merged 2 commits into
mainfrom
td-lib
Feb 20, 2026
Merged

Update typeberry/lib#482
tomusdrw merged 2 commits into
mainfrom
td-lib

Conversation

@tomusdrw

Copy link
Copy Markdown
Member

No description provided.

@netlify

netlify Bot commented Feb 19, 2026

Copy link
Copy Markdown

Deploy Preview for pvm-debugger ready!

Name Link
🔨 Latest commit a3524a2
🔍 Latest deploy log https://app.netlify.com/projects/pvm-debugger/deploys/699772324b29040008c53830
😎 Deploy Preview https://deploy-preview-482--pvm-debugger.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR updates the @typeberry/lib dependency from 0.5.0-6a64d40 to 0.5.8, refactors imports across 30+ files from barrel exports to submodule-specific imports, removes deprecated externalities mappings from FetchHostCall, and adds external module bundling configuration.

Changes

Cohort / File(s) Summary
Dependency Management
package.json
Updated @typeberry/lib to 0.5.8; removed @swc/core from devDependencies.
Host Call Handler Imports
src/components/HostCallDialog/handlers/FetchHostCall.tsx, GasHostCall.tsx, InfoHostCall.tsx, ProvideHostCall.tsx, ReadHostCall.tsx, TransferHostCall.tsx, WriteHostCall.tsx, YieldHostCall.tsx, hostCallUtils.ts, storageManager.ts
Refactored imports from barrel exports to submodule-specific paths (e.g., jam-host-calls, pvm-host-calls, bytes, block, utils, state, numbers, hash). FetchHostCall also removed deprecated externalities mappings (allOperands, oneOperand, allTransfers, oneTransfer).
Component & Utility Imports
src/components/DebuggerSettings/Content.tsx, SpiConfigDialog.tsx, Instructions/BasicBlocks/CollapsibleInstructionsTable.test.tsx, Instructions/BasicBlocks/blockUtils.test.tsx, Instructions/utils.tsx, MemoryPreview/utils.ts, ProgramLoader/Loader.tsx, ProgramLoader/loading-utils.ts, ProgramLoader/spiEncoding.ts, ProgramTextLoader/index.tsx, src/lib/utils.ts, src/pages/ProgramLoader.tsx
Switched imports from barrel exports to submodule-specific paths (bytes, pvm-interpreter, codec, numbers, etc.) across DebuggerSettings, Instructions, ProgramLoader, and utility modules.
PVM Package Imports
src/packages/pvm/pvm/args-decoder.ts, assemblify.ts, disassemblify.ts
Updated pvm imports from barrel exports to @typeberry/lib/pvm-interpreter namespace imports.
Web-Worker Package Imports
src/packages/web-worker/command-handlers/host-call.ts, load.ts, src/packages/web-worker/pvm.ts, types.ts, utils.ts
Refactored imports from barrel to submodule-specific paths (pvm-interpreter, pvm-interface, numbers, utils).
Type & Utility File Imports
src/types/pvm.ts, src/utils/spi.ts
Changed pvm imports from named alias to namespace imports from @typeberry/lib/pvm-interpreter.
Build Configuration
vite.config.ts
Added external: ["module"] to build.rollupOptions for Rollup bundling configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • PR #463: Main PR's import path refactors and @typeberry/lib version bump directly affect the same SPI/JAM-related files and import paths introduced by this PR.
  • PR #455: Main PR refactors import paths and namespace usage for bytes, jam-host-calls, and pvm-interpreter across HostCallDialog handler files that were modified in the "host calls wip" PR.
  • PR #451: Main PR's @typeberry/lib version bump and switch from barrel to submodule imports directly enable SPI fixes that PR #451 depends on.
🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No description was provided, but the changeset is clear from file-level summaries showing systematic import refactoring and dependency updates. Consider adding a brief description explaining the rationale for the import refactoring (e.g., tree-shaking benefits, @typeberry/lib restructuring).
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating the @typeberry/lib dependency and refactoring imports to use granular module paths.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch td-lib

Comment @coderabbitai help to get the list of available commands and usage tips.

@tomusdrw tomusdrw merged commit 373fb30 into main Feb 20, 2026
7 checks passed
@tomusdrw tomusdrw deleted the td-lib branch February 20, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant